﻿@model Project_2._2.ViewModels.TinTuc_ViewModels

@{
    ViewBag.Title = "TinTuc";
    Layout = "~/Views/Shared/_UserLayoutPage2.cshtml";
    var db = new Project_2._2.Models.QuanLyThueXeEntities();
    var tt = (from p in db.TinTucs where p.isDelete == false orderby p.TinTucId descending select p).ToList();
}

<div style="width:748px; min-height:500px; height:auto; border:2px solid #cfcfcf; border-radius:5px; margin-top:10px">
    <div style="height:54px; width:748px; background:url('../Images/UserDesign/bg_right.png') repeat-x; border-bottom:2px solid #cfcfcf;">
        <div style="width:105px; height:54px; float:left; margin-left:5px;">
            <img src="../Images/UserDesign/car.png" />
        </div>
        <div style="width:638px; height:54px; float:right">
            <span style="font-weight:bold; color:#ffffff; font-family:Tahoma; font-size:14px; line-height:38px">DANH SÁCH TIN TỨC</span>
        </div>
    </div>
    <div style="min-height:100px; height:auto; width:748px">
        @foreach (var item in tt)
        {
            <table>
                <tr>
                    <td colspan="2" style="padding-top: 10px; padding-left: 10px;">
                        <a href="@Url.Action("TinTucChiTiet", "Xe", new { id = @item.TinTucId })">@item.TieuDe</a>
                    </td>
                </tr>
                <tr>
                    <td style="padding-left:10px;">
                        <img style="width:100px; height:100px;" src="~/Images/AnhDaiDien/@item.HinhDaiDien">
                    </td>
                    <td style="padding-left:10px">
                        @item.TomTat <br /><br />
                        <p style="color:red">Ngày Đăng: @item.NgayDang</p>
                    </td>
                </tr>
            </table><br />
        }
    </div>
</div>
